var MAX_LIST_SEARCH_RESULTS_ROWS = 5;
var MAX_GRID_SEARCH_RESULTS_ROWS = 1;
-var MaxWidthBin = GObject.registerClass(
-class MaxWidthBin extends St.Bin {
+var MaxWidthBox = GObject.registerClass(
+class MaxWidthBox extends St.BoxLayout {
vfunc_allocate(box, flags) {
let themeNode = this.get_theme_node();
let maxWidth = themeNode.get_max_width();
this.actor = new St.BoxLayout({ name: 'searchResults',
vertical: true });
- this._content = new St.BoxLayout({ name: 'searchResultsContent',
- vertical: true });
- this._contentBin = new MaxWidthBin({ name: 'searchResultsBin',
- x_fill: true,
- y_fill: true,
- child: this._content });
-
- let scrollChild = new St.BoxLayout();
- scrollChild.add(this._contentBin, { expand: true });
+ this._content = new MaxWidthBox({ name: 'searchResultsContent',
+ vertical: true });
this._scrollView = new St.ScrollView({ x_fill: true,
y_fill: false,
overlay_scrollbars: true,
style_class: 'search-display vfade' });
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
- this._scrollView.add_actor(scrollChild);
+ this._scrollView.add_actor(this._content);
+
let action = new Clutter.PanAction({ interpolate: true });
action.connect('pan', this._onPan.bind(this));
this._scrollView.add_action(action);